public class ChemicalReaction extends RDProps
basic usage will be something like:
ChemicalReaction rxn;
rxn.addReactantTemplate(r1);
rxn.addReactantTemplate(r2);
rxn.addProductTemplate(p1);
rxn.initReactantMatchers();
MOL_SPTR_VECT prods;
for(MOL_SPTR_VECT::const_iterator r1It=reactantSet1.begin();
r1It!=reactantSet1.end();++r1It;){
for(MOL_SPTR_VECT::const_iterator r2It=reactantSet2.begin();
r2It!=reactantSet2.end();++r2It;){
MOL_SPTR_VECT rVect(2);
rVect[0] = *r1It;
rVect[1] = *r2It;
std::vector
Modifier | Constructor and Description |
---|---|
|
ChemicalReaction() |
|
ChemicalReaction(ChemicalReaction other) |
protected |
ChemicalReaction(long cPtr,
boolean cMemoryOwn) |
|
ChemicalReaction(java.lang.String binStr) |
clear, clearComputedProps, clearProp, getCPtr, getDict, getPropList, getPropList, getPropList, hasProp, setProp, setProp, updateProps, updateProps
protected ChemicalReaction(long cPtr, boolean cMemoryOwn)
public ChemicalReaction()
public ChemicalReaction(ChemicalReaction other)
public ChemicalReaction(java.lang.String binStr)
protected static long getCPtr(ChemicalReaction obj)
public long addReactantTemplate(ROMol mol)
Adds a new reactant template.
public long addAgentTemplate(ROMol mol)
public long addProductTemplate(ROMol mol)
Adds a new product template.
public void removeUnmappedReactantTemplates(double thresholdUnmappedAtoms, boolean moveToAgentTemplates, ROMol_Vect targetVector)
public void removeUnmappedReactantTemplates(double thresholdUnmappedAtoms, boolean moveToAgentTemplates)
public void removeUnmappedReactantTemplates(double thresholdUnmappedAtoms)
public void removeUnmappedReactantTemplates()
public void removeUnmappedProductTemplates(double thresholdUnmappedAtoms, boolean moveToAgentTemplates, ROMol_Vect targetVector)
public void removeUnmappedProductTemplates(double thresholdUnmappedAtoms, boolean moveToAgentTemplates)
public void removeUnmappedProductTemplates(double thresholdUnmappedAtoms)
public void removeUnmappedProductTemplates()
public void removeAgentTemplates(ROMol_Vect targetVector)
public void removeAgentTemplates()
public ROMol_Vect_Vect runReactants(ROMol_Vect reactants, long numProducts)
public ROMol_Vect_Vect runReactants(ROMol_Vect reactants)
Runs the reaction on a set of reactants.
reactants,:
- the reactants to be used. The length of this must be equal to this->getNumReactantTemplates()
public ROMol_Vect_Vect runReactant(ROMol reactant, long reactantTemplateIdx)
public ROMol_Vect getReactants()
public ROMol_Vect getAgents()
public ROMol_Vect getProducts()
public SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RDKit__ROMol_t_t__const_iterator beginReactantTemplates()
public SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RDKit__ROMol_t_t__const_iterator endReactantTemplates()
public SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RDKit__ROMol_t_t__const_iterator beginProductTemplates()
public SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RDKit__ROMol_t_t__const_iterator endProductTemplates()
public SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RDKit__ROMol_t_t__const_iterator beginAgentTemplates()
public SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RDKit__ROMol_t_t__const_iterator endAgentTemplates()
public long getNumReactantTemplates()
public long getNumProductTemplates()
public long getNumAgentTemplates()
public void initReactantMatchers()
initializes our internal reactant-matching datastructures.
This must be called after adding reactants and before calling runReactants.
public boolean isInitialized()
public boolean validate(SWIGTYPE_p_unsigned_int numWarnings, SWIGTYPE_p_unsigned_int numErrors, boolean silent)
validates the reactants and products to make sure the reaction seems 'reasonable'
numWarnings,:
- used to return the number of validation warnings
numErrors,: used to return the number of validation errors
silent,: If this bool is true, no messages will be logged during the validation. By default, validation problems are reported to the warning and error logs depending on their severity.public boolean validate(SWIGTYPE_p_unsigned_int numWarnings, SWIGTYPE_p_unsigned_int numErrors)
validates the reactants and products to make sure the reaction seems 'reasonable'
numWarnings,:
- used to return the number of validation warnings
numErrors,: used to return the number of validation errors
silent,: If this bool is true, no messages will be logged during the validation. By default, validation problems are reported to the warning and error logs depending on their severity.public boolean getImplicitPropertiesFlag()
public void setImplicitPropertiesFlag(boolean val)
sets the implicit properties flag. See the documentation for getImplicitProertiesFlag() for a discussion of what this means.
public static ChemicalReaction ReactionFromSmarts(java.lang.String sma, boolean useSmiles)
public static ChemicalReaction ReactionFromSmarts(java.lang.String sma)
public static ChemicalReaction ReactionFromRxnBlock(java.lang.String block)
public static ChemicalReaction ReactionFromRxnFile(java.lang.String filename)
public static java.lang.String ReactionToSmarts(ChemicalReaction rxn)
public static java.lang.String ReactionToRxnBlock(ChemicalReaction rxn)
public static ROMol ReduceProductToSideChains(ROMol product, boolean addDummyAtoms)
public void compute2DCoordsForReaction(double spacing, boolean updateProps, boolean canonOrient, long nFlipsPerSample, long nSamples, int sampleSeed, boolean permuteDeg4Nodes)
public Int_Vect ToBinary()
public static ChemicalReaction RxnFromBinary(Int_Vect pkl)
public Int_Pair validateReaction(boolean silent)
public Int_Pair validateReaction()
public boolean validate()